<template>
    <rx-dialog @handOk="handleSubmit" @cancel="cancel">
        <rx-layout>
            <div slot="center">
                <a-form style="height:100%;">
                    <a-form-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="$comi18('rxDialog.name', '标题')">
                        <a-input v-model="title" ></a-input>
                    </a-form-item>
                    <a-form-item :label-col="labelCol1" :wrapper-col="wrapperCol1" :label="i18n('multipleChoice','多选')">
                        <a-switch size="small" v-model="settings.multiSelect"/>
                    </a-form-item>
                    <a-form-item :labelCol="labelCol1" :wrapperCol="wrapperCol1" :label="i18n('defValue','默认值')">
                        <rx-group-component v-model="value" :single="settings.multiSelect"></rx-group-component>
                    </a-form-item>
                </a-form>
            </div>
        </rx-layout>
    </rx-dialog>
</template>

<script>
import filter from "./filter";
import {RxGroupComponent} from "@lowcode/jpaas-common-lib";

export default {
    name: "group-filter",
    mixins:[filter],
    components:{
        RxGroupComponent
    },
    data() {
        return {
        }
    },
    created() {

    },
    methods: {
        i18n(name,text,key){
            return this.$ti18(name,text,"codeGenSetting",key);
        },
        //初始化配置
        initSetting() {
            if(this.row.settings){
                this.settings =this.row.settings;
            }else {
                this.settings = {
                    multiSelect:false
                }
            }
        },
        //获取配置
        getSetting(){
            return this.settings;
        },
    },
    watch: {
    }
}
</script>

<style scoped>
</style>